//
//  LeVBOManager.h
//  Leste
//
//  Created by 王乐 on 2022/1/26.
//

#ifndef LeVBOManager_hpp
#define LeVBOManager_hpp

#include <map>
#include <vector>
#include "LeMeshData.h"

class LeVBOManager
{
public:
    LeVBOManager();
    ~LeVBOManager();
    
public:
    static bool findVBO(const char* name, unsigned int& result);
    
    static void addVBO(const char* name, float vertices[], unsigned int size);
    
    static void removeVBO(const char* name);
    
private:
    static std::map<const char*, unsigned int> m_mapVBOs;
};

class VBOFactory
{
public:
    VBOFactory(){
        LeVBOManager::addVBO("Cube", cubeVertices, sizeof(cubeVertices));
        LeVBOManager::addVBO("Quad", quadVertices, sizeof(quadVertices));
        LeVBOManager::addVBO("ScreenQuad", screenQuadVertices, sizeof(screenQuadVertices));
    }
    ~VBOFactory()
    {
        
    }
};


#endif /* LeVBOManager_hpp */
